package top.lilele.adminSystem.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import top.lilele.adminSystem.dto.UserListDto;
import top.lilele.adminSystem.entity.AdminUserEntity;

import java.util.List;

/**
 * @author lilele
 */
@Component
@Mapper
public interface AdminUserMapper extends BaseMapper<AdminUserEntity> {

    /**
     * 查询用户列表
     *
     * @return
     */
    List<UserListDto> queryUserList();

    /**
     * 获取用户的角色-权限
     *
     * @param queryWrapper
     * @return
     */
    UserListDto queryUserInfoAndRoleById(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);

    /**
     * 根据id查询用户信息
     * @param userId
     * @return
     */
    UserListDto queryUserById(@Param("userId") String userId);
}
